package com.caregiver.watch.business.data.service;

import com.caregiver.watch.business.data.enums.SportTypeEnum;
import com.caregiver.watch.business.data.model.po.HealthBaseData;
import com.caregiver.watch.business.data.model.po.HealthBloodOxygen;
import com.caregiver.watch.business.data.model.po.HealthBloodPressure;
import com.caregiver.watch.business.data.model.po.HealthDeviceLocation;
import com.caregiver.watch.business.data.model.po.HealthEcg;
import com.caregiver.watch.business.data.model.po.HealthHeartRate;
import com.caregiver.watch.business.data.model.po.HealthHeartRateVariability;
import com.caregiver.watch.business.data.model.po.HealthRri;
import com.caregiver.watch.business.data.model.po.HealthSleepDisplay;
import com.caregiver.watch.business.data.model.po.HealthTemperature;
import com.caregiver.watch.business.data.model.po.SportData;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description: 健康数据查询服务
 * @Author 疆戟
 * @Date 2025/9/24 22:37
 * @Version 1.0
 */
public interface HealthDataQueryService {


    /**
     * 查询基础健康数据
     */
    HealthBaseData queryHealthBaseData(Long userId, String deviceUuId);


    /**
     * 查询基础健康数据
     */
    HealthBaseData queryHealthBaseData(Long userId, String deviceUuId, LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 获取用户最新的基础数据
     */
    List<HealthBaseData> queryLastDataList(Long userId, String deviceUuid, LocalDateTime startTime, LocalDateTime endTime);
    /**
     * 查询用户当天运动数据
     */
    List<SportData> queryTodaySportData(Long userId, String deviceUuid);

    /**
     * 查询用户最新的定位数据
     */
    HealthDeviceLocation queryLatestDeviceLocationByDeviceUuid(Long userId, String deviceUuid);

    /**
     * 查询用户定位数据
     */
    List<HealthDeviceLocation> queryDeviceLocations(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);


    /**
     * 查询用户最新的心电数据
     */
    List<HealthEcg> queryLatestEcgData(Long userId, String deviceUuid);

    /**
     * 获取用户最新的心率数据
     */
    HealthHeartRate queryLatestHrData(Long userId, String deviceUuid);

    /**
     * 获取用户最新的心率数据
     */
    List<HealthHeartRate> queryHrData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);


    /**
     * 获取用户最新的血压数据
     */
    HealthBloodPressure queryLatestBpData(Long userId, String deviceUuid);

    /**
     * 获取用户血压数据
     */
    List<HealthBloodPressure> queryBpData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户最新的心率变异与疲劳数据
     */
    HealthHeartRateVariability queryLatestHrvData(Long userId, String deviceUuid);


    /**
     * 获取用户最新的睡眠数据
     */
    HealthSleepDisplay queryLatestSleepData(Long userId, String deviceUuid);

    /**
     * 获取用户最新的血氧数据
     */
    HealthBloodOxygen queryLatestBloodOxygenData(Long userId, String deviceUuid);

    /**
     * 获取用户最新的体温数据
     */
    HealthTemperature queryLatestBodyTemperatureData(Long userId, String deviceUuid);

    /**
     * 获取用户最新的睡眠数据
     */
    HealthSleepDisplay queryLatestSleepData(Long userId, String deviceUuid, LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 获取用户睡眠数据
     */
    List<HealthSleepDisplay> querySleepData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户压力数据
     */
    List<HealthHeartRateVariability> queryStressValueData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户心电数据
     */
    List<HealthEcg> queryEcgData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户运动数据
     */
    List<LocalDateTime> queryExistTraceDate(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户血氧数据
     */
    List<HealthBloodOxygen> queryBloodOxygenData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户体温数据
     */
    List<HealthTemperature> queryTemperatureData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户运动数据
     */
    List<SportData> querySportData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);

    /**
     * 获取用户RRI数据
     */
    List<HealthRri> queryRriData(Long userId, String deviceUuid, LocalDateTime start, LocalDateTime end);
}
